import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
import NotFound from '../views/404.vue'
import Index from '../views/index.vue'
import BaiduOcr from '../components/maincomponents/baidu/ocr.vue'
import BaiduOcrTranslate from '../components/maincomponents/baidu/ocrTranslate.vue'
import BaiduTextTranslate from '../components/maincomponents/baidu/textTranslate.vue'
import AliOcr from '../components/maincomponents/ali/ocr.vue'
import AliOcrTranslate from '../components/maincomponents/ali/ocrTranslate.vue'
import AliTextTranslate from '../components/maincomponents/ali/textTranslate.vue'
import YoudaoOcr from '../components/maincomponents/youdao/ocr.vue'
import YoudaoOcrTranslate from '../components/maincomponents/youdao/ocrTranslate.vue'
import YoudaoTextTranslate from '../components/maincomponents/youdao/textTranslate.vue'

const routes = [{
	path: '/',
	component: Index,
	children: [{
		path: '/baiduocr',
		component: BaiduOcr
	}, {
		path: '/baiduocrTranslate',
		component: BaiduOcrTranslate
	}, {
		path: '/baidutextTranslate',
		component: BaiduTextTranslate
	}, {
		path: '/aliocr',
		component: AliOcr
	}, {
		path: '/aliocrTranslate',
		component: AliOcrTranslate
	}, {
		path: '/alitextTranslate',
		component: AliTextTranslate
	}, {
		path: '/youdaoocr',
		component: YoudaoOcr
	}, {
		path: '/youdaoocrTranslate',
		component: YoudaoOcrTranslate
	}, {
		path: '/youdaotextTranslate',
		component: YoudaoTextTranslate
	}]
}, {
	path: '/:pathMatch(.*)*',
	name: 'NotFound',
	component: NotFound
}]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})
export default router
